package com.oa.ylms.apps.business.account;

import java.util.List;

import com.oa.ylms.apps.entity.account.AccountInfoValue;
import com.oa.ylms.apps.entity.archives.StaffInfoValue;

public interface IAccountInfoService {
	public int getTotalNumber();
	/**
	 * 分页查询出入账信息
	 * @param inOrOut
	 * @param rows
	 * @param pageNo
	 * @return
	 * @throws Exception
	 */
	public List<AccountInfoValue> queryAccountInfoWithPage(StaffInfoValue staffInfo,Integer inOrOut,Integer states
			,int rows, int pageNo) throws Exception;
	public int countTPages(StaffInfoValue staffInfo,Integer inOrOut,Integer states,
			int rows)throws Exception;
	/**
	 * 添加一条出/入账信息
	 * 
	 * @param accountInfo
	 * @param i
	 * @return accountId
	 * @throws Exception
	 */
	public int addAccountInfo(StaffInfoValue staffInfo,AccountInfoValue accountInfo)
			throws Exception;

	/**
	 * 查询需要审批的财务信息(查询全部或者根据出入账类型查询)
	 * @param inOrOut
	 * @return
	 * @throws Exception
	 */
	public List<AccountInfoValue> queryAccountCheck(StaffInfoValue staffInfo,int inOrOut)
			throws Exception;

	/**
	 * 根据账单的Id得到账单的对象
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public AccountInfoValue queryById(Integer id) throws Exception;

	/**
	 * 审批人员，账单审批通过时的操作
	 * @param id
	 * @param comments
	 * @throws Exception
	 */
	public void checkPass(StaffInfoValue staffInfo,Integer id, String comments) throws Exception;

	/**
	 * 审批人员，账单审批失败时的操作
	 * 
	 * @param id
	 * @param comments
	 * @throws Exception
	 */
	public void checkUnpass(StaffInfoValue staffInfo,Integer id, String comments) throws Exception;

	/**
	 * 根据各种查询条件查询财务信息
	 * 
	 * @param inOrOut
	 * @param startDate
	 * @param endDate
	 * @param title
	 * @param posters
	 * @param state
	 * @return
	 */
	public List<AccountInfoValue> queryAccountInfo(String inOrOut,
			String startDate, String endDate, String title, String posters,
			String state) throws Exception;

	/**
	 * 备用的一个方法
	 * 
	 * @param inOrOut
	 * @param startDate
	 * @param endDate
	 * @param title
	 * @param posters
	 * @param state
	 * @return
	 */
	public List<AccountInfoValue> queryAccountInfo1(Integer inOrOut,
			String startDate, String endDate, String title, String posters,
			Integer state) throws Exception;
	
	public boolean queryAccountInfo(Integer year, Integer month , Integer inOrOut)throws Exception;
	public List<AccountInfoValue> queryAccountList(Integer year, Integer month , Integer inOrOut)throws Exception;
	public void countTotal(List<AccountInfoValue> list) throws Exception;
	public double getInTotalInfo();
	public double getOutTotalInfo();
	
}
